import request from '@/utils/request'

/**
 * 登录获取token
 * @returns
 */
export const loginAPI = data => {
  return request({
    url: '/index/login',
    method: 'POST',
    data
  })
}

/**
 * 获取用户信息
 * @returns
 */
export const getInfo = () => {
  return request({
    url: '/index/profile',
    method: 'POST'
  })
}

export function logout () {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
